package day2Test4;

import java.io.Serializable;

//1,有一个水果销售摊位,销售3种水果,重量和单价各不相同,实现多次的销售业务
//2,销售时如果为顾客为女性销售金额打8折
//3,显示当前各种水果的库存数
//4,查询全部销售记录信息
//5,加入其它水果品种
//6,添加进货单
//7·查询指定日期间隔的销售纯利润
//8,每日17: :00之后为5折特价
//9,按销售数量排序显示前三名
//10,示当前各种水果的库存数,成本单价,单价,累计销售数量/金额,累计进货数量/金额

public class Fruits implements Comparable,Serializable{
/**
	 * 
	 */
	private static final long serialVersionUID = 7408400456468099567L;
private String name;//水果名称
private double weight;//重量
private double selling_price;//单价
private double cost_price;//成本价
private double repertory;//库存
private double sales;//销量
private double accruing_amounts;//累计销售金额;
private double amount_purches;//累计进货量
private double amount_purches_cost;//累计进货金额
public String getName() {
	return name;
}
public void setName(String name) {
	this.name = name;
}
public double getWeight() {
	return weight;
}
public void setWeight(double weight) {
	this.weight = weight;
}
public double getSelling_price() {
	return selling_price;
}
public void setSelling_price(double selling_price) {
	this.selling_price = selling_price;
}
public double getCost_price() {
	return cost_price;
}
public void setCost_price(double cost_price) {
	this.cost_price = cost_price;
}
public double getRepertory() {
	return repertory;
}
public void setRepertory(double repertory) {
	this.repertory = repertory;
}
public double getSales() {
	return sales;
}
public void setSales(double sales) {
	this.sales = sales;
}
public double getAccruing_amounts() {
	return accruing_amounts;
}
public void setAccruing_amounts(double accruing_amounts) {
	this.accruing_amounts = accruing_amounts;
}
public double getAmount_purches() {
	return amount_purches;
}
public void setAmount_purches(double amount_purches) {
	this.amount_purches = amount_purches;
}
public double getAmount_purches_cost() {
	return amount_purches_cost;
}
public void setAmount_purches_cost(double amount_purches_cost) {
	this.amount_purches_cost = amount_purches_cost;
}
public Fruits(String name, double weight, double selling_price, double cost_price, double repertory, double sales,
		double accruing_amounts, double amount_purches, double amount_purches_cost) {
	super();
	this.name = name;
	this.weight = weight;
	this.selling_price = selling_price;
	this.cost_price = cost_price;
	this.repertory = repertory;
	this.sales = sales;
	this.accruing_amounts = accruing_amounts;
	this.amount_purches = amount_purches;
	this.amount_purches_cost = amount_purches_cost;
}
public Fruits() {
	super();
	// TODO Auto-generated constructor stub
}
@Override
public int compareTo(Object o) {
	// TODO Auto-generated method stub
	Fruits fruit = (Fruits) o;
	int falg =  (int)(fruit.getSales()-this.getSales());
	return falg;
}

}
